import request from './request'
// 网关新增
export const deviceGatewayAdd = (addDeviceGateway) => {
  return request({
    url: '/deviceGateway/add',
    method: 'post',
    data: addDeviceGateway,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 网关列表
export const deviceGatewayList = (params) => {
  return request({
    url: '/deviceGateway/list',
    method: 'get',
    param: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

//  网关详情
export const deviceGatewayDetail = (gatewayId) => {
  return request({
    url: '/deviceGateway/detail',
    method: 'get',
    param: {
      gatewayId
    },
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 修改网关
export const deviceGatewayUpdate = (updateDeviceGateway) => {
  return request({
    url: '/deviceGateway/update',
    method: 'post',
    data: updateDeviceGateway,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}
// 全部设备网关列表
export const deviceGatewayGatewayList = () => {
  return request({
    url: '/deviceGateway/gatewayList',
    method: 'get',
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}
